<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>商品信息·</title>
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/bootstrap.min.css" rel="stylesheet">
        <link href="./css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/signin.css"  rel="stylesheet"> 
  </head>
  <body style="background-color:#eee">
  <br>
     <h2 class="sub-header">商品信息列表</h2>
	 <br>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>商品名称</th>
                  <th>商品价格</th>
			   <th>添加时间</th>
                 
                  <th>商品销量</th>
			   <th>库存数量</th>
			    <th>商品图片</th>
			   <th>商品修改</th>
			   <th>商品删除</th>
                </tr>
              </thead>
              <tbody>
			  <c:forEach items="${requestScope.allGoods}" var="good">
			<c:if test="${good.totalNum!='0'}">
                <tr>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${good.goodsName}</span></td>
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${good.goodsPrice}</span></td>
                  
                  <td style="text-align:center; line-height:50px;"><span style="float:left">${good.timeAdd}</span></td>
			   <td style="text-align:center; line-height:50px;"><span style="float:left">${good.goodsNum}</span></td>
			   <td style="text-align:center; line-height:50px;"><span style="float:left">${good.totalNum}</span></td>
		        <td><img src="${good.shopPic}" style="width:70px;height:50px; float:left;"></td>
				<td style="text-align:center; line-height:50px;"><span style="float:left">
				<a href="${pageContext.request.contextPath}/shopper/shopper_delete?goods.goodsId=${good.goodsId} ">删除</a></span></td>
			   <td style="text-align:center; line-height:50px;"><span style="float:left"><a href="${pageContext.request.contextPath}/shopper/shopper_updateView?goods.goodsId=${good.goodsId} ">修改</a></span></td>
                </tr>
			 </c:if>
		</c:forEach>
			 <a href="${pageContext.request.contextPath}/shopper/addGoods.jsp">添加商品</a>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    <script src="../js/jquery-3.0.0.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
  </body>
</html></em>